put MonitorConfig(monitorNdx, "noDialog:errGlobal") into theConfig
if errGlobal Γëá empty then
answer "Error:" && errGlobal
put empty into errGlobal
else
put theConfig & return after cd fld "monitor list"
end if
end repeat
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=132 top=292 right=326 bottom=225
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 8192
-- line height: 16
-- part name: CardWindow
----- HyperTalk script -----
on mouseUp
global errGlobal
put MonitorConfig("CardWindow", "noDialog:errGlobal") into theConfig
if errGlobal Γëá empty then
answer "Error: ΓÇ£" & errGlobal & "ΓÇ¥"
put empty into errGlobal
else
put theConfig into cd fld "monitor list"
end if
end mouseUp
-- part contents for background part 38
----- text -----
31/50
-- part contents for background part 20
----- text -----
An XFCN which returns the current configuration of the Mac's monitor(s). The information returned for each monitor is:
Line 1 - absolute global coordinates of the monitor. The point 0,0 in this world is the upper left corner of the menu bar.
Line 2 - horizontal and vertical size of the monitor (in pixels).
Line 3 - NuBus slot number of the monitor's video card. Numbers start at 1 (slot nearest the power supply).
Line 4 - current bit depth and color setting.
Line 5 - "Active" if the monitor it has been activated from the Monitors cdev , or "Inactive" if it is inactive.
Line 6 - "Has menu bar" if the monitor contains the menu bar, empty if not.
Calling syntax : monitorConfig(monitorNum or ΓÇ£CardWindowΓÇ¥,<ΓÇ£noDialogΓÇ¥:errorGlobal> )
MONITORNUM: which monitor to check (monitor #1 is the boot monitor ie. it shows the "smiley mac" on bootup or when holding the option key down while in the 'Monitors' CDEV).
CARDWINDOW: report on the monitor containing the HyperCard window.
NOTE - the XFCN uses the middle of the card window as it's location. If that point is offscreen it checks the following points (in order) until it finds one which is onscreen: middle of the window's title bar, upper right corner of the window's title bar, and upper left of the window's title bar.